package com.valentinalee.bms.web.servlet.filemanage2;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.valentinalee.bms.service.FileSystemService;
import com.valentinalee.bms.service.impl.FileSystemServiceImpl;

public class UpdateFileInfoServlet extends HttpServlet{

	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		doPost(req, resp);
	}

	public void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		
		req.setCharacterEncoding("utf-8");
		String id = req.getParameter("id");
		String fileUser = req.getParameter("fileUser");
		
		FileSystemService service=new FileSystemServiceImpl();
		service.updateFileUserById(fileUser, id);
		
		resp.setCharacterEncoding("utf-8");
		resp.getWriter().write("修改成功!!!");
		//req.getRequestDispatcher("/jsp/file/queryFile.jsp").forward(req, resp);
		
	}
	
	

}
